package cn.ggcms.cms.dao.impl;

import java.util.List;

import cn.ggcms.cms.dao.AritcleDao;
import cn.ggcms.cms.utils.SimpleDao;
import cn.ggcms.cms.vo.Aritcle;

public class AritcleImpl extends SimpleDao<Aritcle> implements AritcleDao {

	public boolean doInsertAritcle(Aritcle Aritcle) {
		boolean flag = false;
		try {
			 super.save(Aritcle);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
	}
	public Aritcle findAritcle(Aritcle aritcle) {
		return aritcle;	
	}
	public Aritcle finAritcleById(int id) {
		return  super.find(Aritcle.class,id);
	}
	public List<Aritcle> finAritcles() {

		return super.find(Aritcle.class);
	}
	public boolean doDeleteAritcleById(int id) {
		boolean flag = false;
		try {
			super.delete(Aritcle.class, id);
			flag = true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
	}

}
